

package com.hazelcast.internal.util;

/**
 * Provides memory information using {@link java.lang.Runtime}.
 */
public class RuntimeMemoryInfoAccessor implements MemoryInfoAccessor {

    @Override
    public long getTotalMemory() {
        return Runtime.getRuntime().totalMemory();
    }

    @Override
    public long getFreeMemory() {
        return Runtime.getRuntime().freeMemory();
    }

    @Override
    public long getMaxMemory() {
        return Runtime.getRuntime().maxMemory();
    }

}
